# 作   者：要努力，努力，再努力
# 开发日期：2022/4/23 15:31
class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def info(self):
        print(self.name, self.age)


class Student(Person):
    def __init__(self, name, age, stunumbet):
        super().__init__(name, age)
        self.stunumber = stunumbet

    def info(self):  # 在子类重写父类方法
        super().info()
        print(self.stunumber)


class Teacher(Person):
    def __init__(self, name, age, teachyear):
        super().__init__(name, age)
        self.teachyear = teachyear

    def info(self):
        super().info()
        print('教龄', self.teachyear)


stu = Student('张三', 20, '1001')
teacher = Teacher('李四', 34, 10)

stu.info()
teacher.info()
